package com.contory.ssn_lgnd.app.title;

import com.contory.ssn_lgnd.app.Assets;
import com.contory.ssn_lgnd.app.Settings;
import com.contory.ssn_lgnd.app.comp.ButtonObjectPtr;
import com.contory.ssn_lgnd.app.comp.ToggleObject;

public class TitleMusicBtrTodo implements ButtonObjectPtr{
	final Title title;
	final ToggleObject btr;
	public TitleMusicBtrTodo(Title title, ToggleObject btr){
		this.title = title;
		this.btr = btr;
	}
	
	@Override
	public void todo() {
		if(btr.IsDisable){
			Settings.saveMusicEnabled(title.getGLGame().getFileIO(), false);
			Assets.stopBGM(Assets.BGM);
		}
		else{
			Settings.saveMusicEnabled(title.getGLGame().getFileIO(), true);
			Assets.playBGM(Assets.BGM);
		}
	}
}
